# Source this file to set things up for IQE

IQDIR=/opt/IQ # Edit this to match your installation
if [[ $PATH != *${IQDIR}/bin* ]]; then
  echo Adding ${IQDIR}/bin to your PATH
  PATH=$IQDIR/bin:$PATH
  export PATH
fi

# If you don't use Matlab, delete the following:
if [[ ${MATLABPATH:-foobar} != *${IQDIR}/matlab* ]]; then
  echo Adding ${IQDIR}/matlab to your MATLABPATH
  MATLABPATH=$IQDIR/matlab${MATLABPATH:+:${MATLABPATH}}
  export MATLABPATH
fi

# If you don't use Octave, delete the following:
if ! [[ -e $HOME/.octaverc ]] || ! grep -q $IQDIR/octave $HOME/.octaverc; then
  echo Adding ${IQDIR}/octave to your Octave path in $HOME/.octaverc
  (echo addpath $IQDIR/octave; echo savepath; echo quit) | \
    octave >/dev/null 2>/dev/null
fi
